/**
 * 项目名称: Topic_100.cpp
 * 项目路径: study/DataStructure/LeetCode/树/简单
 * 编辑时间: 2024年08月07日08时04分32秒
 * 用   户: 轻尘
 */

#include <bits/stdc++.h>

using namespace std;

struct TreeNode {
    int val;
    TreeNode *left;
    TreeNode *right;

    TreeNode() : val(0), left(nullptr), right(nullptr) {}

    TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}

    TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};

class Solution {
public:
    bool flag = true;
    bool isSameTree(TreeNode* p, TreeNode* q) {
        if(p&&!q || !p&&q){
            flag = false;
            return false;
        }
        if(p&&q){
            if(p->val != q->val){
                flag = false;
                return false;
            }
            isSameTree(p->left,q->left);
            isSameTree(p->right,q->right);
        }
        return flag;
    }
};

int main() {

    return 0;
}
